package com.my.chapter16;

public class practice7 {
    static BerylliumSphere[][][] createArray(int xLen,int yLen,int zLen){
        BerylliumSphere[][][] b = new BerylliumSphere[xLen][yLen][zLen];
        for(int i=0;i<b.length;i++){
            for(int j=0;j<b[i].length;j++){
                for(int k=0;k<b[i][j].length;k++){
                    b[i][j][k] = new BerylliumSphere();
                }
            }
        }
        return b;
    }

    static void printArray(BerylliumSphere[][][] b){
        for(int i=0;i<b.length;i++){
            for(int j=0;j<b[i].length;j++){
                for(int k=0;k<b[i][j].length;k++){
                    System.out.print(b[i][j][k] + " ");
                }
                System.out.println("");
            }
            System.out.println("");
        }
    }

    public static void main(String[] args) {
        printArray(createArray(2,2,3));
    }
}
